<?php echo $this->render("header.phtml"); ?>
<label class="title">Administrator control - Change password</label>
<div class="horiz_sep">&nbsp;</div>
<form action="<? echo $this -> baseUrl ?>/<?= $this->contextPath ?>/change-password" method="post">
<table cellpadding="0" cellspacing="5" width="100%" border="0">
<?php
	$errors = $this->errors;
	if (count($errors)){
		if (array_key_exists('old_password_incorrect', $errors)) 
			$old_pass_incorrect = $errors['old_password_incorrect'];
		else 
			$old_pass_incorrect = "";
			
		if (array_key_exists('confirm_password_incorrect', $errors))
			$confirm_pass_incorrect = $errors['confirm_password_incorrect'];
		else 
			$confirm_pass_incorrect = "";
			
		if (array_key_exists('password_length_incorrect', $errors))
			$password_length_incorrect = $errors['password_length_incorrect'];
		else 
			$password_length_incorrect = "";
	}
	else{
		$old_pass_incorrect = "";
		$confirm_pass_incorrect = "";
		$password_length_incorrect = "";
	}
?>
	<tr>
    	<th width="30%" align="right">Old password:</th>
    	<td><input type="password" name="old_password" value="" style="padding:2px;"/><font color='red'><b><?php echo " ".$old_pass_incorrect; ?></b></font></td>
  	</tr>
  	<tr>
    	<th align="right">New password:</th>
    	<td><input type="password" name="new_password" value="" style="padding:2px;"/><font color='red'><b><?php echo " ".$password_length_incorrect; ?></b></font></td>
  	</tr>
  	<tr>
    	<th align="right">Confirm new password:</th>
    	<td><input type="password" name="confirm_new_password" value="" style="padding:2px;"/><font color='red'><b><?php echo " ".$confirm_pass_incorrect; ?></b></font></td>
  	</tr>
  	<tr>
    	<th></th>
    	<td><input type="submit" name="save" value="Save"/></td>
  	</tr>
</table>
</form>
<?php echo $this->render("footer.phtml"); ?>